package com.example.exampletest.mapper;

import com.example.exampletest.model.Course;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CourseMapper {
    int insert(Course course);
    int update(Course course);
    int deleteById(@Param("id") Long id);
    Course selectById(@Param("id") Long id);
    List<Course> selectAll();
    List<Course> search(@Param("keyword") String keyword, @Param("sortOrder") Integer sortOrder);
    List<Course> selectByStatus(@Param("status") Integer status);
    List<Course> selectByEnterpriseId(@Param("enterpriseId") Integer enterpriseId);
    int updateStatus(@Param("id") Long id, @Param("status") Integer status, @Param("auditReason") String auditReason);
} 